package com.fh.modules.dbms.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author qiujunda
 * @Date 02/08/2020
 * @Description
 */
public class TableCompareResult {
    public TableCompareResult(){

    }
    public TableCompareResult(String tableName1,String tableName2){
        this.tableName1=tableName1;
        this.tableName2=tableName2;
    }
    public TableCompareResult(String tableName){
        this.tableName1=tableName;
        this.columnResult=false;
        this.indexResult=false;
        this.result=false;
    }

    private String tableName1;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date lastDdlTime1;

    private String tableName2;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date lastDdlTime2;

    private boolean columnResult;

    private boolean indexResult;

    private boolean result;

    public String getTableName1() {
        return tableName1;
    }

    public void setTableName1(String tableName1) {
        this.tableName1 = tableName1;
    }

    public String getTableName2() {
        return tableName2;
    }

    public void setTableName2(String tableName2) {
        this.tableName2 = tableName2;
    }

    public boolean isColumnResult() {
        return columnResult;
    }

    public void setColumnResult(boolean columnResult) {
        this.columnResult = columnResult;
    }

    public boolean isIndexResult() {
        return indexResult;
    }

    public void setIndexResult(boolean indexResult) {
        this.indexResult = indexResult;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public Date getLastDdlTime1() {
        return lastDdlTime1;
    }

    public void setLastDdlTime1(Date lastDdlTime1) {
        this.lastDdlTime1 = lastDdlTime1;
    }

    public Date getLastDdlTime2() {
        return lastDdlTime2;
    }

    public void setLastDdlTime2(Date lastDdlTime2) {
        this.lastDdlTime2 = lastDdlTime2;
    }
}
